/* $RCSFile: Ko.aspx.cs $
 * Apache license v2 2011 by Christian Surieux
 * $Source: ?/AddonNice.ECommerce/EndTransac/Ko.aspx.cs $
 * $log$
 * Revision 21 2010/08/09 11:08:11  christian.surieux
 *   Added Log comment to all .ascx .aspx .master files
 * Revision 8 2010/08/09 10:07:05  christian.surieux
 *   Added Log comment to all cs files
 */

using System;
using System.Collections;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AddonNice.Security;
using AddonNice.UI;
using AddonNice.Helpers;
using AddonNice.Configuration;

namespace AddonNice.ECommerce
{
	/// <summary>
	/// Summary description for ko.
	/// </summary>
	public partial class Ko : StdAuxPage
	{
        /// <summary>
        /// Reserved Page used here to have endtransac pages share same theme
        /// </summary>
        public override int PageID
        {
            get
            {
                return StStr.PageECommerceEndTransac;
            }
        }

        public override bool HasGoogleTranslator
        {
            get
            {
                return false;
            }
        }

		protected void Page_Load(object sender, System.EventArgs e)
		{
		}

        /// <summary>
        /// Redirect user back to the Portal Home Page
        /// </summary>
        void ContinueBtn_Click(object sender, ImageClickEventArgs e)
        {
			AddonNice.Security.PortalSecurity.PortalHome(true,this);
        }

        public Ko() : base (false,false,false,false)
        {
            DefaultUrlReferrerToPageID = false;
        }

		#region Std overrides

        ImageButton ContinueBtn =   null;

        protected override void OnPreInit(EventArgs e)
        {
            MasterPage m                =   Master; // to instanciate all controls Cf bug asp.ent
            string strcult              =   LocalizeHelper.GetCurrentNeutralCultureName();
            ContinueBtn                 =   new ImageButton();
            ContinueBtn.ID              =   "BtnContinue";
            ContinueBtn.SkinID          =   "next_" + strcult;
            PlaceHolderButtons.Controls.Add(ContinueBtn);
            base.OnPreInit(e);
        }


		override protected void OnInit(EventArgs e)
		{
			InitializeComponent();
			base.OnInit(e);
		}
		
		private void InitializeComponent()
		{
            Load                +=  new EventHandler(Page_Load);
            ContinueBtn.Click   +=  new ImageClickEventHandler(ContinueBtn_Click);
		}

        #endregion Std overrides
	}
}
